export default [
  {
    path: '/web/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue'),
    meta: { title: '登录', requiresAuth: false },
  },
  {
    path: '/web',
    component: () => import('@/layout/index.vue'),
    redirect: '/web/dashboard',
    meta: { title: '首页' },
    children: [
      {
        path: 'dashboard',
        name: 'Dashboard',
        component: () => import('@/views/dashboard/index.vue'),
        meta: { title: '仪表盘', icon: 'Odometer', requiresAuth: true },
      },
    ],
  },
  {
    path: '/web/user',
    component: () => import('@/layout/index.vue'),
    redirect: '/web/user/list',
    meta: { title: '用户中心' },
    children: [
      {
        path: 'list',
        name: 'UserList',
        component: () => import('@/views/user/index.vue'),
        meta: { title: '用户列表', icon: 'User', requiresAuth: true },
      },
      {
        path: 'detail',
        name: 'UserDetail',
        component: () => import('@/views/user/detail.vue'),
        meta: { title: '用户详情', icon: 'User', requiresAuth: true },
      },
    ],
  },
  {
    path: '/web/order',
    component: () => import('@/layout/index.vue'),
    redirect: '/web/order/list',
    meta: { title: '订单中心' },
    children: [
      {
        path: 'list',
        name: 'Order',
        component: () => import('@/views/order/index.vue'),
        meta: { title: '订单列表', icon: 'User', requiresAuth: true },
      },
      {
        path: 'detail',
        name: 'OrderDetail',
        component: () => import('@/views/order/detail.vue'),
        meta: { title: '订单详情', icon: 'User', requiresAuth: true },
      },
    ],
  },
  {
    path: '/web/system',
    component: () => import('@/layout/index.vue'),
    redirect: '/web/system/',
    meta: { title: '系统管理' },
    children: [
      {
        path: 'operator',
        name: 'OperatorLog',
        component: () => import('@/views/system/operator/index.vue'),
        meta: { title: '操作日志', icon: 'User', requiresAuth: true },
      },
      {
        path: 'user',
        name: 'userManege',
        component: () => import('@/views/system/userManaege/index.vue'),
        meta: { title: '成员管理', icon: 'User', requiresAuth: true },
      },
      {
        path: 'role',
        name: 'RoleManage',
        component: () => import('@/views/system/roleManage/index.vue'),
        meta: { title: '角色管理', icon: 'User', requiresAuth: true },
      },
      {
        path: 'dict',
        name: 'SystemDict',
        component: () => import('@/views/system/dict/index.vue'),
        meta: { title: '字典管理', icon: 'User', requiresAuth: true },
      },
    ],
  },
  // 404页面
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: () => import('@/views/error/404.vue'),
    meta: { title: '404', requiresAuth: false },
  },
];
